import request from '@/utils/request'

export default {

    //记录列表
    getManhourList(searchModel) {
        return request({
            url: '/manhour',
            method: 'get',
            params: {

            }
        });
    },

    //记录详情
    getManhourById(id) {
        return request({
            url: '/manhour/' + id,
            method: 'get',
        });
    },


    //添加证件信息
    saveManhour(form) {
        if (form.id) {
            var url = '/manhour/' + form.id;
        } else {
            var url = '/manhour';
        }
        return request({
            url: url,
            method: 'post',
            params: {
                //项目id
                project_id: form.project_id,
                //审核人
                check_id: form.check_id,
                //时间
                time: form.time,
                //工作内容
                content: form.content,
                //天数
                day: form.day,
            }
        });
    },

    //根据id删除证件信息
    delManhourById(id) {
        return request({
            url: '/manhour/delete/' + id,
            method: 'post',
        });
    },

    //审核通过/驳回
    check(id,state){
        return request({
            url: '/manhour/check/' + id,
            method: 'post',
            params: {
                //项目id
                state: state,
            }
        });
    }



    // //根据项目id和类型id获取证件列表信息
    // getProjectCredentials(project_id, type) {
    //     return request({
    //         url: '/project/' + project_id + '/' + type,
    //         method: 'get',
    //     });
    // },

    // //根据id获取单个证件信息
    // getCredentialById(id) {
    //     return request({
    //         url: '/credentials/' + id,
    //         method: 'get',
    //     });
    // },










    // getClientList(searchModel) {
    //     return request({
    //         url: '/client',
    //         method: 'get',
    //         params:{
    //             page:searchModel.pageNo,
    //             paginate:searchModel.pageSize,
    //             pageSize:searchModel.pageSize,
    //             username:searchModel.username,
    //             uid:searchModel.uid,
    //         }
    //     });
    // },


}